# ubuntu/debian puppy basesfs pkglist
#
# generic commands: %exit %include %makesfs %import
# special package commands: %get_pkgs_by_priority %addbase %addpkg %bblinks %remove %repo %lock %cutdown
# installer commands: %bootstrap %dpkg %dpkgchroot %depend %nodepend %reinstall %dpkg_configure
# startup default: bootstrap, nodepend
#
# extra param for commands, params can be quoted
# %include        include-file
# %makesfs        output.sfs [squashfs-param]
# %pkg_by_prio    priority ["inclusion-egrep"] ["exclusion-egrep"]
# %bblinks        [nousr]
# %remove         pkgname ...
# %repo           url version sections pkgdb
# %addpkg         pkgname ...
# %reinstall      pkgname ...
# %dpkg_configure configure flags
# %lock           pkgname ...
# %cutdown        [all doc gtkdoc nls cache dev]
# %import         dir ...
#
# %symlink        source target
# %rm             file ... (-rf flag is always used)
# %mkdir          dir ... (-p flag is always used)
# %touch          file ...
# % %chroot         command ...
#
# start with %pkgs_by_prio required. Otherwise start with libc6.
#

# essential packages
%pkgs_by_priority "required" ".*lib.*|^tzdata|^bash|^dash|^lsb-base|^ncurses.*|^bsdutils|^kmod|^mount|^insserv|^mount|^sysvinit-utils|^procps|^makedev" "^klibc|.*plymouth.*|mountall"
#%pkgs_by_priority "required"
#%dpkg             # use dpkg installer instead of bootstrap
#%dpkgchroot       # use dpkg-chroot installer instead of bootstrap
%depend            # turn on dependency
coreutils
grep 
gawk
mawk
sed
tar
gzip
cpio
dialog
gettext

# extra packages
screen             # useful for debugging
file               # for checking file types
locales            # locale files

# xorg packages
%nodepend          # disable dep for udev, otherwise brings loads of dependencies
libkmod2           # debian needs this
udev
%depend            # enable dep for xorg, makes life simpler for us
xserver-xorg
xinit
x11-utils
x11-xserver-utils
fonts-dejavu-core  # standard font

# debian dependencies
libxcb-shm0

# window managers etc
jwm 
rox-filer          # this will pull-in gtk2
rxvt-unicode

# extra libs
librsvg2-2
%nodepend          # librsvg2-bin will pull gtk3 if told not to.
librsvg2-bin       # to convert puppy SVG icons to png
%depend
librsvg2-common    # pixbuf loaders, so GTK2 can shows SVG icons
#libgnome-menu2    # for jwm-xdgmenu, openbox-xdgmenu, etc

# apps
mtpaint

# apt and friends - with its run-time dependencies (among others)
util-linux 
e2fsprogs 
findutils 
perl-base 
module-init-tools
libatm1
passwd
isc-dhcp-common
iproute2
isc-dhcp-client 
psmisc
libxtables10 
gcc-4.9-base
apt-utils
apt

# fixes for apt-get: re-install perl-base and xserver-xorg-core with dpkg
%dpkgchroot
%reinstall perl-base xserver-xorg-core 
%bootstrap         # switch back to bootstrap installer - faster

synaptic # this will pull-in gtk3
dbus

# puppy specific packages
#%repo http://jamesbond3142.no-ip.org/puppy-extra puppy main Packages.gz
xdialog            # note: only i386 arch available
gtkdialog          # note: only i386 arch available

# final steps
# remove extremely toxic packages, then setup the dummy
%remove initscripts ifupdown sysv-rc upstart mountall 
%dummy  initscripts ifupdown sysv-rc upstart mountall

# these useless packages got pulled by apt-get -f install, so prevent it from getting installed
%remove plymouth libplymouth2 plymouth-theme-ubuntu-text
%dummy  plymouth libplymouth2 plymouth-theme-ubuntu-text
%remove busybox-initramfs initramfs-tools-bin klibc-utils initramfs-tools
%dummy  busybox-initramfs initramfs-tools-bin klibc-utils initramfs-tools
%dummy  adduser base-files

# install busybox and its symlinks, fallback for missing utilities
busybox-static
%bblinks

# install extra built-in packages
%addpkg pthemes
%addpkg rox-filer-data

# install puppy-base - MUST BE LAST - unless overriding puppy-base
%dpkg_configure --force-all -a
%addbase
%addpkg debian-setup # specific debian setup, overriding puppy-base
%lock puppy-base puppy-base-arch libc6 # example: never update puppy base and libc6

%addpkg james-staging # temporary area to changes before they get merged to rootfs

# cutdown the size
%cutdown doc gtkdoc nls # all # maximum cutdown

# make the sfs (optional)
%makesfs iso/iso-root/puppy.sfs -comp gzip # -Xcompression-level 1
